package com.ftg.learn.chapter01;

/**
 * 学习数据类型
 *
 * @author 布衣
 */
public class LearnDataType {
    //全局变量  实例(实例)变量 成员变量
    int aint = 13;

    //static 类变量 静态变量
    static int bint = 14;

    public static void main(String[] args) {
        System.out.println(LearnDataType.bint);
        //局部变量
        LearnDataType l = new LearnDataType();
        System.out.println(l.aint);

        Integer integer1 = new Integer(34);
        integer1.byteValue();

        System.out.println(Integer.MAX_VALUE);
        int aint = 15;
        System.out.println(aint);
        byte byte1 = 123;

        byte byte2 = (byte) 128;
        System.out.println(byte2);

        short short1 = 4;

        byte byte3 = (byte) short1;

        short short2 = byte1;


        System.out.println(023);
        System.out.println(0b11111);
        System.out.println(0XFFABCDE);
        float f1 = 23;
        float f2 = (float) 23.34;
        float f3 = 23.34F;
        double d1 = 23.456;
        float f = 2.34f;
        int int8 = (int) f;
//        Asiia码表
        char c = 23462;
        System.out.println(c);

        int int1 = c;
        System.out.println(int1);

        boolean t = true;//false

//        八大基本  -- 八大包装
        int a = 34876;
        Integer a1 = a;
        int a2 = a1;
        //它的包装叫 Integer

        System.out.println(Integer.MAX_VALUE);
        System.out.println(Integer.toBinaryString(a));

//        byte Byte
//                short Short
//                        int Integer
//                                long Long
//                                        float Float
//                                                doulbe Double
//                                                        char Character
//                                                                boolean Boolean

        Integer n1 = new Integer(23);
        System.out.println(n1 == 23);

        int n2 = 23;
        System.out.println(n2 == 23);

        Integer n3 = 23;
        System.out.println(n3 == 23);

        Integer n4 = new Integer(23);
        Integer n5 = new Integer(23);
        System.out.println(n4 == n5);

        Integer s = Integer.valueOf("123");
        System.out.println(s);

        int[] arr1 = new int[2];

        final int abc = (int) (Math.random() * 15);
        System.out.println(abc);
    }

}
